package com.dxysun.hibernate.service.impl;

import java.util.List;

import com.dxysun.hibernate.dao.IUserDao;
import com.dxysun.hibernate.model.User;
import com.dxysun.hibernate.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements IUserService
{

	@Autowired
	private IUserDao dao;

	@Override
	public List<User> query()
	{
		return dao.findAll();
	}

	@Override
	public User save(User user)
	{
		return dao.save(user);
	}
}
